package com.chen.authority.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chen.authority.common.model.PageQo;
import com.chen.authority.common.response.Response;
import com.chen.authority.model.dto.RoleDto;
import com.chen.authority.model.po.RolePo;
import com.chen.authority.model.qo.RoleQo;
import com.chen.authority.model.vo.RoleVo;

import java.util.List;

/**
 * 角色Service接口
 *
 * @author chengy
 * @date 2022-08-17
 */
public interface RoleService extends IService<RolePo> {

    Response addOrUpdateRole(Integer id, RoleDto dto);

    Response deleteRoleByIds(Integer[] roleIds);

    Page<RoleVo> pageQueryRoleList(PageQo pageQo, RoleQo roleQo);

    List<RoleVo> exportRoleList(QueryWrapper<RolePo> queryWrapper);

    List<RoleVo> findRolesByUserId(Object userId);

    List<Integer> findMenuIdsByRoleId(Integer roleId);

}
